Skip to content

Fix macOS SSE server test connection issues#12

Merged
0xeb merged 1 commit intomainfrom
fix/macos-sse-server-test
Nov 29, 2025
Merged

Fix macOS SSE server test connection issues#12
0xeb merged 1 commit intomainfrom
fix/macos-sse-server-test

Conversation

@0xeb
Copy link
Copy Markdown
Owner

@0xeb 0xeb commented Nov 28, 2025

Problem

The fastmcpp_sse_server test was failing on macOS CI (both Debug and Release) with connection errors:

  • "Connection handling canceled (7)"
  • "POST request failed"
  • "SSE GET request failed: Failed to read connection (4)"

Tests passed on Ubuntu and Ubuntu ARM but consistently failed on macOS.

Root Cause

The test had a "connection readiness check" (lines 51-67) that:

  1. Immediately canceled the connection (line 61 returned false)
  2. On macOS, this left the server in a bad state for subsequent connections
  3. The POST and SSE connections then failed due to lingering connection issues

Solution

  1. Removed problematic connection test - The immediate-cancel test was causing more harm than good on macOS
  2. Increased server startup wait - From 1s to 2s to ensure server is fully ready
  3. Added delay before SSE connection - 100ms grace period before the SSE thread attempts connection

Testing

  • Local build and test (Windows)
  • Waiting for macOS CI results
  • Ubuntu CI should still pass

Impact

  • Test now waits slightly longer (1s additional delay) but is more reliable across platforms
  • No functional changes to the SSE server implementation
  • Removes flaky connection check that was macOS-specific issue

Remove problematic connection test that was causing macOS CI failures:
- Removed immediate-cancel connection check (lines 51-67)
- Increased server startup wait from 1s to 2s for macOS
- Added 100ms delay before SSE thread connection attempts

The test connection was canceling immediately (line 61 returned false)
which caused connection handling errors on macOS that persisted into
the actual test. This left the server in a bad state for subsequent
POST and SSE connections.

Fixes: #<issue>
@0xeb 0xeb merged commit 4a28129 into main Nov 29, 2025
7 of 9 checks passed
@0xeb 0xeb deleted the fix/macos-sse-server-test branch November 29, 2025 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant